﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DAL;
using System.Data;

namespace logic
{
    public class news
    {
        public static DataSet select(string where, string orderby, int pagesize, int pageindex)
        {
            return DAL.DbHelper.ExecuteDataSetPageSize("*", "vw_News_list", where, "newsId", orderby, pagesize, pageindex);
        }
        public static void insert(NewsEntity _news)
        {
            News.insert(_news);
        }

        public static void update(NewsEntity _news)
        {
            News.update(_news);
        }

        public static void delete(int newsId)
        {
            News.delete(newsId);
        }

        public static NewsEntity getById(int newsid)
        {
            return News.getById(newsid);
        }
        public static void updateClick(int newsId)
        {
            News.updateClick(newsId);
        }
    }
}
